Initial Setup Properties |
||
Runtime Properties |
||
|
||
Methods |
||
|
||
Events |
||
Overview
The VoiceCmd control allows application-wide voice commands like: HELP, OPERATOR, NEXT, and EXIT. The voice commands are always on, regardless of the current position in the call-flow and independent of the regular application logic implemented using the VoiceRec controls. Importantly, VoiceCmd does not require additional speech recognition licenses to be used. Just one license per call is needed for VBVoice to handle both the regular call-flow and additional voice-commands grammars.
The VoiceCmd control listens to a channel in a background mode and does not respond until it recognizes a pre-defined voice command (word or phrase). It uses a second grammar in parallel with VoiceRec control grammars, with no limit on the number of defined commands. When a voice command is recognized by the ASR engine, any currently active voice processing is terminated, the VoiceCmd takes control of the call, and then routes it through one of its user-defined exit nodes to an appropriate handler.
Voice commands are activated each time the call enters the VoiceCmd control. At this time, VBVoice sets up the recognition engine using the selected grammar and exits the control via the Start node. Multiple VoiceCmd controls can be used to activate different global commands in different sections of the call-flow.
Any errors occurring during setup and parsing of conditions triggers a VoiceError event. If the VoiceError event is not handled, the call will exit through the Error node.
The VoiceCmd control is supported on Nuance with Tier 4 licensing. The SAPI ASR engines are not supported.
note: VoiceCmd control is not supported in test and simulator mode.
Grammars
For a basic introduction to grammar files and speech recognition, see About Speech Recognition.
Nuance
The grammar file is created by the Nuance Grammar Compiler, which defines one or more grammars. Each grammar consists of a list of words (or phrases) and optionally the context in which they are recognized. The Natural Language Interpretation must use the slot definition: vbvVoiceCmd.
You can optionally set up one or more decoy words. A decoy is a word or phrase that you might expect a user to utter -- one that is similar (in sound) to a voice command, but one for which you want no action to be taken. For example, if sales is a voice command and you anticipate that "sell" could be uttered, set this word up in the grammar as a decoy in order to enhance recognition results (see the sample grammar below). Pronexus recommends using decoy words in parts of the call-flow outside of the VoiceRec control.
EXAMPLE |
.VCmd1 [sales {<vbvVoiceCmd sales>} ]
(sell) |
For a complete example, please refer to the sample grammar file in %VBVoice_Install_Path%\Examples\VoiceCmd\Grammars\VoiceCmd.grammar and ..\VoiceCmd.slot_definition.
In applications that use VoiceCmd and VoiceRec controls at the same time, an empty slot must be included in every VoiceRec controls grammar with the label of VbvVoiceCmds so that VBVoice can insert the voice command into the grammar dynamically.
EXAMPLE |
.Main ( sales {<return sales>} |
For a complete example, please refer to the sample grammar file in %VBVoice_Install_Path%\Examples\VoiceCmd\Gram-mars\EZFlow.grammar and ..\EZFlow.slot_definition
Licensing
VoiceCmd control shares the recognition session with the VoiceRec controls. Therefore, only one recognition session is used per call and no additional licenses from the engines manufacturer are required.
The number of concurrent recognition sessions available for all VBVoice channels on a given machine is negotiated with the Runtime Manager (RTM) at the application start time. VBVoice requests NumberOfEngines (an INI parameter set in the [ASR] section of the VBVOICE.INI file), but the negotiated number may turn out lower if not enough licenses are available in the RTM.
Once application is started, the number of recognition sessions successfully negotiated is initialized with the ASR engine and made available for all VBVoice channels (i.e. they are pooled together and allowed to float between the calls). If the INI setting AllocEnginePerCall is set to 1, a session is grabbed from the pool when a call starts; otherwise, its grabbed only when the call enters the first VoiceCmd or VoiceRec control.
The session is returned to the pool when the VoiceRec control releases it or when the call is terminated (the VoiceCmd control does not release the engine by itself). Please note that once the session is released, it may not be grabbed again for the same call. Consequently, any subsequent use of voice recognition controls will result in a NoLicenseAvailable event being fired.
Initial Setup Properties
MinLength, MaxLength
(Float)
You can improve the performance of voice command recognition for your application by using the parameters MaxLength and MinLength to specify the range of lengths that are reasonable for a specific voice command. These settings allow the system to only process utterances that are not too short or too long to be the voice command, preventing recognition resources from being wasted. The default values for these parameters are 1.7 and 0.5 seconds, respectively.
Conditions
(Object)
The condition objects used by the VoiceCmd control contain the name of each voice command. See Conditions Object.
Runtime Properties
CompilationConfig
(Channel as Integer)String
This property contains a string specifying the name of a running compilation-server process. May be null if just one recognition package and no named compilation options are specified. Refer to Nuance documentation for an explanation of Compilation Config parameters.
GotoNode
(Integer)
This property will transfer a call to another control. See GotoNode.
MaxLength
(Channel as Integer)Float
See MaxLength.
MinLength
(Channel as Integer)Float
See MinLength.
Methods
TakeCall
This method allows the programmer to override the graphical connections and transfer a call to any other control. See TakeCall.
StopVoiceCmd
This method stops the recognition of voice commands. Once stopped the VoiceCmd control must be entered again to re-enable the voice commands.
Events
Enter
See Enter Event.
Exit
See Exit Event.
VoiceError
See VoiceError Event.
VoiceCmd Setup Property Page (Nuance)
Maximum length for utterance
(MaxLength property)
Enter the number of second to specify the maximum of length that are reasonable for the voice command. Default value is 1.7 seconds.
Minimum length for utterance
(MinLength property)
Enter the number of second to specify the minimum of length that are reasonable for the voice command. Default value is 0.5 seconds.
Grammar file
This field provides the name of the grammar text file.
Grammar to load
This field provides the name of the grammar to load from the grammar text File. If no name is set, the GrammarName runtime property must be set by code at runtime.
VoiceCmd DB Setup Property Page (Nuance Only)
DB Provider
(DBProvider property)
This property contains a string identifying the database provider. The only supported values are:
-
fs for file system
-
oci for Oracle
-
odbc for Microsoft SQL Server 7.0
DB Name
(DBName property)
This field contains the name of the database, either file system based or relational database used for the Nuance Dynamic Grammar.
DB Server
(DBServer property)
This field contains the name identifying the database alias used to connect to database via network. Used for relational database ODBC or Oracle only.
DB Auth
(DBAuth property)
This field contains the name identifying the username and password needed to connect to a relational database. The string should be in username:password format.
DB Format
(DBFormat property)
This property contains a string identifying the data types for the database provider. Your database provider should support variable length binary data that can be fetched and written piece by piece. For example, Microsoft SQL Server 7.0 supports IMAGE data types. If you do not specify this option, the data type LONG RAW is used by default, which may not be the right data type for your database provider.
DB Root
(DBRoot property)
This field contains the name identifying the database root directory. Used for File System only.
Maximum length for utterance
(MaxLength property)
Enter the number of second to specify the maximum expected length for a voice command. Any longer utterances will be ignored. Default value is 1.7 seconds.
Minimum length for utterance
(MinLength property)
Enter the number of second to specify the minimum expected length a the voice command. Any shorter utterances will be ignored. Default value is 0.5 second.
Grammar File
This field provides the name of the text file containing the voice commands grammars. Please note that the grammar file (compiled or un-compiled) must exist on the machine that runs the recognizer server.
Weight
This field customizes the recognition server that the voice command has higher or lower precedence than other grammars should the VoiceRec control is also used in the call-flow. If a higher value is entered, the voice command will have precedence over the word(s) or phase(s) specified in the VoiceRec control.
VoiceCmd Routing Property Page
Edit Grammar File
Use this button to edit the grammar text file as specified in the setup page. If the Nuance Grammar Builder is installed, it will be launched automatically. Otherwise, Notepad is launched.
Import Voice Command
Click this button to import the voice command(s) you have set up in the grammar text file. Each voice command read from the grammar file will be matched to the condition list. If a match is found, the voice command read will be ignored. Otherwise, the new command will be appended to the list. Any command which appears on the list but does not exist in the grammar file will not be removed. This is done so you can temporary disable part of a call-flow by removing the command from the grammar file (a re-compile of the grammar file is required prior to starting the system).
Delete from the List
Use this button to remove the highlighted voice command from the condition list. If a voice command is removed from the list but not from the grammar file, there will be an error generated at system start up to prevent a recognised command without having an appropriate action.
NOTE:
At system start up, the list of voice command(s) will be validated with the specified grammar file. The voice command appears in the file must be present in the condition list because a recognised command must have an appropriate action. However, a voice command appears on the list can be omitted in the grammar file. This is done to facilitate temporary disabling of any voice command without having to remove the graphical connection to it. This validation is also performed when the form containing the Voice Command control is about to be opened at design time.
You can optionally set up one or more decoy words, words that have no associated action. In this case, the Nuance recogniser would still recognise the decoy word(s) but, because there is no interpretation, do not cause the recogniser to return an action. The decoy word(s) do not consider as a voice command.
If you are delivering a system with runtime EXE only, you can deliver it with the compiled package only (ie: without delivering the grammar text file). Under such circumstances, VBVoice assumes the voice command matches the commands which have been set up in the package. Hence, the validation will not be performed.